package com.liusaidh.controller;

import com.liusaidh.domain.User;
import com.liusaidh.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;

@Controller
public class UserController {

    @Autowired
    private UserService userService;

    @RequestMapping("/")
    public String index(Model model){
        return "login";
    }

    @RequestMapping("/register")
    public String register(User user, HttpServletRequest request){
        String email = request.getParameter("email");
        String password = request.getParameter("password");
        return "register";
    }
}
